<script setup>
import { ref, onMounted } from 'vue'
import { getBrList } from "@/api/index";
// import News from '../components/News/index.vue';
import newindex from '@/components/newIndex.vue'
// import $ from 'jquery';
const bannerList = ref();
// 获取banner图列表
const getbannerList = async () => {  //同步调用
    const {
        data: { data },
    } = await getBrList();
    // console.log(data);
    bannerList.value = data;
    // console.log(bannerList);
};

const box1data = ref([
    { id: 1, text: '中餐学院2022级新生军训圆满闭营,中餐学院2022级新生军训...', text1: '2019-01', text2: '28' },
    { id: 2, text: '中餐学院2022级新生军训圆满闭营,中餐学院2022级新生军训...', text1: '2019-01', text2: '28' },
    { id: 3, text: '中餐学院2022级新生军训圆满闭营,中餐学院2022级新生军训...', text1: '2019-01', text2: '28' },
    { id: 4, text: '中餐学院2022级新生军训圆满闭营,中餐学院2022级新生军训...', text1: '2019-01', text2: '28' }
])

onMounted(()=>{
    getbannerList();
    // getBList();
})
</script>

<template>
    <div id="box">
        <div class="swiper">
            <t-swiper class="tdesign-demo-block--swiper" :duration="300" :interval="2000">
                <t-swiper-item v-for="item in bannerList" :key="item.id" class="t-swiper-item">
                    <div class="demo-item">
                        <img :src="item.image" alt="" />
                    </div>
                </t-swiper-item>
            </t-swiper>
        </div>

        <!-- <News></News> -->
        <newindex></newindex>

        <div class="box1">
            <div class="box1center">
                <div class="box1-left">
                    <div class="box1-top">
                        <div class="box2-top1">党团建设</div>
                        <div class="box2-top2">
                            <div>查看更多</div>
                            <div><img src="../assets/sucai/next.png" /></div>
                        </div>
                    </div>
                    <div class="box1-left1" v-for="(item, index) in box1data" :key="index">
                        <div class="box1-left1-left">
                            <div class="box1-left1-left-1">{{ item.text2 }}</div>
                            <div class="box1-left1-left-2">{{ item.text1 }}</div>
                        </div>
                        <div class="box1-left1-right">{{ item.text }}</div>
                    </div>
                </div>
                <div class="box1-center">
                    <img src="../assets/sucai/5.png" alt="">
                </div>
                <div class="box1-right">
                    <div class="box1-top">
                        <div class="box2-top1">校企合作</div>
                        <div class="box2-top2">
                            <div>查看更多</div>
                            <div><img src="../assets/sucai/next.png" /></div>
                        </div>
                    </div>
                    <div class="box1-left1" v-for="(item, index) in box1data" :key="index">
                        <div class="box1-left1-left">
                            <div class="box1-left1-left-1">{{ item.text2 }}</div>
                            <div class="box1-left1-left-2">{{ item.text1 }}</div>
                        </div>
                        <div class="box1-left1-right">{{ item.text }}</div>
                    </div>
                </div>
            </div>
        </div>

        <div class="box2">
            <div class="box2center">
                <div class="box2-top">
                    <div class="box2-top1">技能大赛</div>
                    <div class="box2-top2">
                        <div>查看更多</div>
                        <div><img src="../assets/sucai/next.png" /></div>
                    </div>
                </div>
                <div class="box2-bottom">
                    <t-swiper class="tdesign-demo-block--swiper" type="card" :height="280">
                        <t-swiper-item v-for="item in 6" :key="item">
                            <div class="demo-item1"><img src="../assets/image/3.png" /></div>
                        </t-swiper-item>
                    </t-swiper>
                </div>
            </div>
        </div>

        <div class="box3">
            <div class="box3center">
                <div class="box3-top">
                    <div class="box3-top1">技能大赛</div>
                    <div class="box3-top2">
                        <div>查看更多</div>
                        <div><img src="../assets/sucai/next.png" /></div>
                    </div>
                </div>
                <div class="box3-bottom">
                    <img src="../assets/sucai/7.png" /></img>
                    <img src="../assets/sucai/7.png" /></img>
                    <img src="../assets/sucai/7.png" /></img>
                </div>
            </div>
        </div>

        <div class="box4">
            <div class="box4title">
                <div class="box4title1">JIAO YAN CHENG GUO</div>
                <div class="box4title2">教研成果</div>
            </div>
            <div class="box4center">
                <div class="box4center1">
                    <div class="box4center1-1">
                        <img src="../assets/image/12.png" alt="">
                        <div class="box4center1-1font">
                            山东城院“五心工程”<br />
                            温暖校园
                        </div>
                    </div>
                    <div class="box4center1-2">
                        3月24日，一场别开生面的平台通
                        过网络直播的形式拉开帷幕...
                    </div>
                </div>
                <div class="box4center1">
                    <div class="box4center1-1">
                        <img src="../assets/image/12.png" alt="">
                        <div class="box4center1-1font">
                            山东城院“五心工程”<br />
                            温暖校园
                        </div>
                    </div>
                    <div class="box4center1-2">
                        3月24日，一场别开生面的平台通
                        过网络直播的形式拉开帷幕...
                    </div>
                </div>
                <div class="box4center1">
                    <div class="box4center1-1">
                        <img src="../assets/image/12.png" alt="">
                        <div class="box4center1-1font">
                            山东城院“五心工程”<br />
                            温暖校园
                        </div>
                    </div>
                    <div class="box4center1-2">
                        3月24日，一场别开生面的平台通
                        过网络直播的形式拉开帷幕...
                    </div>
                </div>
                <div class="box4center1">
                    <div class="box4center1-1">
                        <img src="../assets/image/12.png" alt="">
                        <div class="box4center1-1font">
                            山东城院“五心工程”<br />
                            温暖校园
                        </div>
                    </div>
                    <div class="box4center1-2">
                        3月24日，一场别开生面的平台通
                        过网络直播的形式拉开帷幕...
                    </div>
                </div>
            </div>
        </div>

        <div class="box5">
            <div class="box5center">
                <div class="box2-top">
                    <div class="box2-top1">学生动态</div>
                    <div class="box2-top2">
                        <div>查看更多</div>
                        <div><img src="../assets/sucai/next.png" /></div>
                    </div>
                </div>
                <div class="box5-bottom">
                    <div class="box5-bottomleft">
                        <div class="box5-bottomleft1">
                            <div class="box5-bottomleft1-1">迎新晚会·独唱</div>
                            <div class="box5-bottomleft1-2"><button>更多+</button></div>
                        </div>
                    </div>
                    <div class="box5-bottomright">
                        <div class="box5-bottomright1">
                            <div class="box5-bottomright1-1"><img src="../assets/image/10.png" /></div>
                            <div class="box5-bottomright1-2">迎新晚会现代舞</div>
                        </div>
                        <div class="box5-bottomright1">
                            <div class="box5-bottomright1-1"><img src="../assets/image/10.png" /></div>
                            <div class="box5-bottomright1-2">运动会</div>
                        </div>
                        <div class="box5-bottomright1">
                            <div class="box5-bottomright1-1"><img src="../assets/image/10.png" /></div>
                            <div class="box5-bottomright1-2">运动会全景</div>
                        </div>
                        <div class="box5-bottomright1">
                            <div class="box5-bottomright1-1"><img src="../assets/image/10.png" /></div>
                            <div class="box5-bottomright1-2">才艺展示</div>
                        </div>
                    </div>
                </div>
                <div class="box5-font">
                    <div>友情链接</div>
                    <div>中华人民共和国教育部</div>
                    <div>山东教育厅</div>
                    <div>山东省科学技术厅</div>
                    <div>中国高职专教育网</div>
                    <div>山东省科学厅</div>
                    <div>中国高职专教育网</div>
                </div>
            </div>
        </div>

        <div class="foot">
            <div class="footcenter">
                <div class="footcenter-center1"><img src="../assets/sucai/xuexiao.png" /></div>
                <div class="footcenter-left">
                    <div class="footcenter-left-1">联系我们</div>
                    <div class="footcenter-left-2">
                        <table>
                            <tr>
                                <td>办公室</td>
                                <td>&nbsp;:&nbsp;&nbsp;0535-2246666</td>
                            </tr>
                            <tr>
                                <td>招生咨询</td>
                                <td>&nbsp;:&nbsp;&nbsp;0535-2246625</td>
                            </tr>
                            <tr>
                                <td>官网</td>
                                <td>&nbsp;:&nbsp;&nbsp;www.sdcc.edu.cn</td>
                            </tr>
                            <tr>
                                <td>邮箱</td>
                                <td>&nbsp;:&nbsp;&nbsp;sdccxy@126.com</td>
                            </tr>
                            <tr>
                                <td>校址</td>
                                <td>&nbsp;:&nbsp;&nbsp;山东省烟台市高新区海天路1001号</td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div class="footcenter-center"><img src="../assets/sucai/xuexiao.png" /></div>
                <div class="footcenter-right">
                    <img class="footcenter-right1" src="../assets/sucai/weixin.png" />
                    <img class="footcenter-right2" src="../assets/sucai/weibo.png" />
                </div>
            </div>
            <div class="footbottom">Copyright 心山东省城市服务技师学院版权所有</div>
        </div>
    </div>
</template>

<style lang="scss">
#box {
    .swiper {
        // margin-top: -94px;
        .demo-item {
            width: 100%;
            height: 500px;

            @media (max-width:475px) {
                height: 200px;
            }

            img {
                width: 100%;
                height: 100%;
            }
        }
    }

    .box1 {
        background-color: #f9f9f9;

        .box1center {
            width: 80%;
            margin: auto;
            display: flex;
            padding-top: 20px;

            @media (max-width:475px) {
                display: block;
                width: 90%;
            }

            .box1-left {
                width: 35%;

                @media (max-width:475px) {
                    width: 100%;
                }

                .box1-top {
                    display: none;

                    @media (max-width:475px) {
                        display: flex;
                        justify-content: space-between;
                        padding-bottom: 5px;
                        margin-bottom: 20px;
                        border-bottom: 1px solid #c9d2e4;

                        .box2-top1 {
                            color: #196bb3;
                            font-size: 22px;
                            font-weight: bold;
                        }

                        .box2-top2 {
                            color: #ccc;
                            font-size: 14px;
                            display: flex;

                            img {
                                width: 20px;
                                height: 20px;
                            }
                        }
                    }
                }

                .box1-left1 {
                    background-color: #fff;
                    margin-bottom: 20px;
                    display: flex;

                    .box1-left1-left {
                        background-color: #005bab;
                        color: #fff;
                        width: 60px;
                        height: 60px;

                        .box1-left1-left-1 {
                            font-size: 30px;
                            text-align: center
                        }

                        .box1-left1-left-2 {
                            font-size: 12px;
                            text-align: center
                        }
                    }

                    .box1-left1-right {
                        padding: 5px;
                    }
                }
            }

            .box1-center {
                width: 30%;

                @media (max-width:475px) {
                    display: none;
                }

                img {
                    width: 100%;
                    height: 306px;
                }
            }

            .box1-right {
                width: 35%;

                @media (max-width:475px) {
                    width: 100%;
                    padding-bottom: 10px;
                }

                .box1-top {
                    display: none;

                    @media (max-width:475px) {
                        display: flex;
                        justify-content: space-between;
                        padding-bottom: 5px;
                        margin-bottom: 20px;
                        border-bottom: 1px solid #c9d2e4;

                        .box2-top1 {
                            color: #196bb3;
                            font-size: 22px;
                            font-weight: bold;
                        }

                        .box2-top2 {
                            color: #ccc;
                            font-size: 14px;
                            display: flex;

                            img {
                                width: 20px;
                                height: 20px;
                            }
                        }
                    }
                }

                .box1-left1 {
                    background-color: #fff;
                    margin-bottom: 20px;
                    display: flex;

                    .box1-left1-left {
                        background-color: #005bab;
                        color: #fff;
                        width: 60px;
                        height: 60px;

                        .box1-left1-left-1 {
                            font-size: 30px;
                            text-align: center
                        }

                        .box1-left1-left-2 {
                            font-size: 12px;
                            text-align: center
                        }
                    }

                    .box1-left1-right {
                        padding: 5px;
                    }
                }
            }
        }
    }

    .box2 {
        margin-top: 40px;
        margin-bottom: 60px;

        @media (max-width:475px) {
            display: none;
        }

        .box2center {
            width: 80%;
            margin: auto;

            .box2-top {
                display: flex;
                justify-content: space-between;

                .box2-top1 {
                    color: #196bb3;
                    font-size: 22px;
                    font-weight: bold;
                }

                .box2-top2 {
                    color: #ccc;
                    font-size: 14px;
                    display: flex;

                    img {
                        width: 20px;
                        height: 20px;
                    }
                }
            }

            .box2-bottom {
                margin: 20px 0;

                .demo-item1 {
                    width: 100%;

                    img {
                        width: 100%;
                        height: 280px;

                    }
                }
            }
        }
    }

    .box3 {
        margin-top: 40px;
        // margin-bottom: 60px;
        display: none;

        @media (max-width:475px) {
            display: block;
        }

        .box3center {
            width: 80%;
            margin: auto;

            @media (max-width:475px) {
                width: 90%;
            }

            .box3-top {
                display: flex;
                justify-content: space-between;

                @media (max-width:475px) {
                    padding-bottom: 10px;
                    margin-bottom: 20px;
                    border-bottom: 1px solid #c9d2e4;
                }

                .box3-top1 {
                    color: #196bb3;
                    font-size: 22px;
                    font-weight: bold;
                }

                .box3-top2 {
                    color: #ccc;
                    font-size: 14px;
                    display: flex;

                    img {
                        width: 20px;
                        height: 20px;
                    }
                }
            }

            .box3-bottom {
                img {
                    width: 100%;
                    height: 200px;
                    margin-bottom: 20px;
                }
            }
        }
    }

    .box4 {
        width: 100%;
        padding-top: 20px;
        padding-bottom: 5px;
        background-image: url(../assets/sucai/3.jpg);
        background-size: 100% 100%;

        @media (max-width:475px) {
            padding-bottom: 10px;
        }

        .box4title {
            text-align: center;
            padding-top: 20px;
            position: relative;
            margin-bottom: 60px;

            .box4title1 {
                background: linear-gradient(to bottom, rgb(255, 255, 255), rgb(225, 224, 224));
                /* 设置背景以文字进行裁切 */
                background-clip: text;
                -webkit-background-clip: text;
                /* 设置文本颜色透明以露出后面裁切成文本形状的渐变背景 */
                color: transparent;
                font-size: 20px;
                font-weight: bold;
            }

            .box4title2 {
                color: #c90000;
                font-weight: bold;
                font-size: 30px;
                position: absolute;
                left: 46%;
                top: 18%;

                @media (max-width:475px) {
                    left: 37%;
                }
            }
        }

        .box4center {
            width: 80%;
            margin: auto;
            // height: 380px;
            margin-bottom: 40px;
            display: flex;
            justify-content: space-between;

            @media (max-width:475px) {
                width: 90%;
                margin: auto;
                display: block;
            }

            .box4center1 {
                width: 23%;
                border-radius: 25%;

                @media (max-width:475px) {
                    width: 100%;
                    margin-bottom: 20px;
                    border-radius: 15px;
                    overflow: hidden;
                }

                &:hover {
                    margin-top: -30px;

                    @media (max-width:475px) {
                        margin-top: 0px;
                    }

                    .box4center1-1 .box4center1-1font {
                        width: 100%;
                        height: 100%;
                        background-color: rgba(168, 197, 226, 0.6);
                    }
                }

                .box4center1-1 {
                    position: relative;

                    img {
                        width: 100%;
                    }

                    .box4center1-1font {
                        position: absolute;
                        top: 0;
                        width: 311px;
                        height: 133px;
                        text-align: center;
                        color: #fff;
                        font-size: 20px;
                        padding-top: 80px;

                        @media (max-width:475px) {
                            width: 411px;
                            // top: 30px;
                        }
                    }
                }

                .box4center1-2 {
                    background-color: #fff;
                    text-align: center;
                    padding: 35px 20px 45px;
                    font-size: 18px;
                }
            }
        }
    }

    .box5 {
        margin-top: 40px;
        margin-bottom: 40px;

        .box5center {
            width: 80%;
            margin: auto;

            .box2-top {
                display: flex;
                justify-content: space-between;

                @media (max-width:475px) {
                    padding-bottom: 10px;
                    margin-bottom: 20px;
                    border-bottom: 1px solid #c9d2e4;
                }

                .box2-top1 {
                    color: #196bb3;
                    font-size: 22px;
                    font-weight: bold;
                }

                .box2-top2 {
                    color: #ccc;
                    font-size: 14px;
                    display: flex;

                    img {
                        width: 20px;
                        height: 20px;
                    }
                }
            }

            .box5-bottom {
                margin-top: 20px;
                display: flex;
                justify-content: space-between;

                @media (max-width:475px) {
                    display: block;
                }

                .box5-bottomleft {
                    width: 44%;
                    height: 440px;
                    border-radius: 15px;
                    padding: 25px;
                    box-sizing: border-box;
                    background-image: url(../assets/image/10.png);

                    @media (max-width:475px) {
                        width: 100%;
                        height: 320px;
                        margin-bottom: 20px;
                    }

                    .box5-bottomleft1 {
                        width: 100%;
                        height: 100%;
                        border: 2px solid #fff;

                        .box5-bottomleft1-1 {
                            color: #fff;
                            text-align: center;
                            font-size: 28px;
                            line-height: 320px;

                            @media (max-width:475px) {
                                line-height: 230px;
                            }

                        }

                        .box5-bottomleft1-2 {
                            width: 20%;
                            margin: -120px auto 0;

                            @media (max-width:475px) {
                                width: 34%;
                                margin: -85px auto 0;
                            }

                            button {
                                background-color: #e69c19;
                                color: #fff;
                                border: none;
                                width: 110px;
                                height: 40px;
                                line-height: 40px;
                                font-size: 18px;

                                @media (max-width:475px) {}
                            }
                        }
                    }
                }

                .box5-bottomright {
                    width: 54%;
                    display: flex;
                    justify-content: space-between;
                    align-content: space-between;
                    flex-wrap: wrap;

                    @media (max-width:475px) {
                        width: 100%;
                    }

                    .box5-bottomright1 {
                        width: 48%;
                        height: 47%;
                        border-radius: 15px;
                        overflow: hidden;
                        position: relative;

                        @media (max-width:475px) {
                            height: 120px;
                            margin-bottom: 10px;
                        }

                        .box5-bottomright1-1 {
                            img {
                                width: 100%;
                                height: 210px;
                            }
                        }

                        .box5-bottomright1-2 {
                            position: absolute;
                            bottom: 0;
                            background-color: rgba(0, 0, 0, 0.4);
                            color: #fff;
                            width: 100%;
                            height: 35px;
                            line-height: 35px;
                            text-align: center;
                        }
                    }
                }
            }

            .box5-font {
                display: flex;
                margin-top: 40px;

                @media (max-width:475px) {
                    display: none;
                }

                div {
                    margin-right: 40px;
                }

                div:nth-child(1) {
                    font-weight: bolder;
                }
            }
        }
    }

    .foot {
        background-image: url(../assets/sucai/4.jpg);
        padding-top: 20px;

        .footcenter {
            width: 80%;
            margin: auto;
            display: flex;
            border-bottom: 1px solid rgba(225, 225, 225, 0.6);

            @media (max-width:475px) {
                display: block;
            }

            .footcenter-center1 {
                width: 45%;
                margin-top: 50px;
                display: none;

                @media (max-width:475px) {
                    width: 100%;
                    display: block;
                    margin-top: 20px;
                    margin-bottom: 40px;
                }

                img {
                    width: 80%;
                    height: 70px;

                    @media (max-width:475px) {
                        width: 100%;
                        height: 60px;
                    }
                }
            }

            .footcenter-left {
                width: 30%;
                color: #fff;

                @media (max-width:475px) {
                    width: 100%;
                }

                .footcenter-left-1 {
                    font-size: 20px;
                    margin-bottom: 10px;
                }

                .footcenter-left-2 {
                    width: 100%;

                    table {
                        width: 100%;

                        tr {
                            margin-bottom: 20px;

                            td:nth-child(1) {
                                width: 20%;
                                text-align-last: justify;
                                text-align: justify;
                                text-justify: distribute-all-lines;
                                padding-bottom: 10px;
                            }

                            td:nth-child(2) {
                                width: 80%;
                                padding-bottom: 10px;
                            }
                        }
                    }
                }
            }

            .footcenter-center {
                width: 45%;
                margin-top: 50px;

                @media (max-width:475px) {
                    display: none;
                }

                img {
                    width: 80%;
                    height: 70px;

                    @media (max-width:475px) {
                        display: none;
                    }
                }
            }

            .footcenter-right {
                @media (max-width:475px) {
                    display: none
                }

                width: 25%;
                padding-top: 45px;
                box-sizing: border-box;

                .footcenter-right1 {
                    width: 40px;
                    height: 40px;
                    margin-right: 40px;
                }

                .footcenter-right2 {
                    width: 37px;
                    height: 36px;

                }
            }
        }

        .footbottom {
            margin-top: 14px;
            color: rgba(255, 255, 255, 0.6);
            // background-color: rgba(0, 0, 0, 0.6);
            text-align: center;
            height: 40px;
            line-height: 40px;
            font-size: 13px;
        }
    }
}
</style>